Skip to content

feat: use task summaries endpoint for sidebar loads#1945

Open
jonathanlab wants to merge 4 commits intomainfrom
fix/faster-sidebar-loads
Open

feat: use task summaries endpoint for sidebar loads#1945
jonathanlab wants to merge 4 commits intomainfrom
fix/faster-sidebar-loads

Conversation

@jonathanlab
Copy link
Copy Markdown
Contributor

@jonathanlab jonathanlab commented Apr 29, 2026

Generated-By: PostHog Code
Task-Id: a801cf87-213b-451b-9cdc-5150e50bc059
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/sidebar/hooks/useSidebarData.ts
Line: 144-148

Comment:
**`useTasks` polled unconditionally on the optimized path**

When `showAllUsers` is `false`, `useTaskSummaries` is used for sidebar data and `fullTasks` is explicitly discarded (`rawTasks = summaryTasks`). Yet `useTasks` is called without an `enabled` guard, so the heavy `/tasks/` list endpoint is still polled at `TASK_LIST_POLL_INTERVAL_MS` in the background on every sidebar mount — directly undercutting the optimisation this PR introduces. Adding `enabled: showAllUsers` (or an equivalent guard) to the hook options would restrict the full-list poll to only the code path that needs it.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "feat: use task summaries endpoint for si..." | Re-trigger Greptile

Comment thread apps/code/src/renderer/features/sidebar/hooks/useSidebarData.ts Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant